package com.llp.declaresystem.dao;

import com.llp.declaresystem.mapper.AdminProjectMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * @author llp
 * {@code @date} 2022年11月27日17:18
 */
@Repository
public class AdminProjectDao {
    @Autowired
    AdminProjectMapper adminProjectMapper;


    public boolean deleteProject(Integer categoryid) {
        //先删除
        adminProjectMapper.deleteFromCategoryUint(categoryid);
        adminProjectMapper.deleteProject(categoryid);
        //后删除
        Integer result = adminProjectMapper.deleteFromProjectCategory(categoryid);
        if(result != null) return true;
        return false;

    }
}
